﻿<%@ Page Title="" Language="C#" MasterPageFile="~/admin/AdmMasterPage.master" ValidateRequest="false" AutoEventWireup="true" CodeFile="0811.aspx.cs" Inherits="admin_UC08_0811" %>

<%@ Register Src="../UserControl/CKEditor.ascx" TagName="CKEditor" TagPrefix="uc1" %>
<%@ Register Assembly="AjaxControlToolkit" Namespace="AjaxControlToolkit" TagPrefix="cc1" %>
<%@ Register Assembly="aspnetpager" Namespace="Wuqi.Webdiyer" TagPrefix="Webdiyer" %>
<asp:Content ID="Content1" ContentPlaceHolderID="head" runat="Server">
</asp:Content>
<asp:Content ID="Content2" ContentPlaceHolderID="ContentPlaceHolder1" runat="Server">
    <asp:Panel ID="pnlContent" runat="server">
        <fieldset class="fieldset">
            <h1>
                會員資訊編輯</h1>
            <table style="width: 100%" class="FormTable">                               
                <tr>
                    <td>
                        建立日期:
                    </td>
                    <td>
                        <asp:Label ID="lblCreateDate" runat="server" Text=""></asp:Label>&nbsp;&nbsp;&nbsp;
                        狀態: 
                        <asp:DropDownList ID="ddlStatus" runat="server">
                            <asp:ListItem Text="請選擇" Value=""></asp:ListItem>
                            <asp:ListItem Text="審核中" Value="0"></asp:ListItem>
                            <asp:ListItem Text="審核通過" Value="1"></asp:ListItem>
                            <asp:ListItem Text="審核不通過" Value="2"></asp:ListItem>
                            <asp:ListItem Text="停用" Value="3"></asp:ListItem>
                        </asp:DropDownList>
                        <asp:RequiredFieldValidator ID="RequiredFieldValidator2" runat="server" ErrorMessage="請選擇狀態"
                            ControlToValidate="ddlStatus"></asp:RequiredFieldValidator>
                    </td>
                </tr>
                <tr>
                    <td>
                        姓名
                    </td>
                    <td>
                        <asp:Label ID="lblName" runat="server"></asp:Label>
                    </td>
                </tr>
                <tr>
                    <td>
                        帳號
                    </td>
                    <td>
                        <asp:Label ID="lblLoginId" runat="server"></asp:Label>
                    </td>
                </tr>
                <tr>
                    <td>
                        是否為討論區管理者
                    </td>
                    <td>
                        <asp:DropDownList ID="ddlIsAdmin" runat="server">
                            <asp:ListItem Text="請選擇" Value=""></asp:ListItem>
                            <asp:ListItem Text="否" Value="False"></asp:ListItem>
                            <asp:ListItem Text="是" Value="True"></asp:ListItem>
                        </asp:DropDownList>
                        <asp:RequiredFieldValidator ID="RequiredFieldValidator1" runat="server" ErrorMessage="請選擇是否為討論區管理者"
                            ControlToValidate="ddlIsAdmin"></asp:RequiredFieldValidator>
                    </td>
                </tr>
                <%--<tr>
                    <td>
                        信箱
                    </td>
                    <td>
                        <asp:Label ID="lblEmail" runat="server"></asp:Label>
                    </td>
                </tr>--%>                
                <tr>
                    <td>
                        電話
                    </td>
                    <td>
                        <asp:Label ID="lblPhone" runat="server"></asp:Label>
                    </td>
                </tr>
                <tr>
                    <td>
                        手機
                    </td>
                    <td>
                        <asp:Label ID="lblMobile" runat="server"></asp:Label>
                    </td>
                </tr>
                <tr>
                    <td>
                        學歷
                    </td>
                    <td>
                        <asp:Label ID="lblEducationalLv" runat="server"></asp:Label>
                    </td>
                </tr>                                
                <tr>
                    <td valign="top">
                        專業別
                    </td>
                    <td>
                        <asp:Label ID="lblProfessional" runat="server"></asp:Label>
                        <asp:Label ID="lblProfessionalOther" runat="server"></asp:Label>
                    </td>
                </tr>
                <tr>
                    <td>
                        職稱
                    </td>
                    <td>
                        <asp:Label ID="lblJobTitle" runat="server"></asp:Label>
                    </td>
                </tr>
                <tr>
                    <td>
                        單位名稱
                    </td>
                    <td>
                        <asp:Label ID="lblCompany" runat="server"></asp:Label>
                    </td>
                </tr>
                <tr>
                    <td>
                        單位地址
                    </td>
                    <td>
                        <asp:Label ID="lblCompanyAddressCity" runat="server"></asp:Label>
                        <asp:Label ID="lblCompanyAddressCountry" runat="server"></asp:Label>
                        <asp:Label ID="lblCompanyAddress" runat="server"></asp:Label>
                    </td>
                </tr>
                <tr>
                    <td>
                        單位電子信箱
                    </td>
                    <td>
                        <asp:Label ID="lblCompanyEmail" runat="server"></asp:Label>
                    </td>
                </tr>
                <tr>
                    <td valign="top">
                        失智症相關受訓及服務經歷
                    </td>
                    <td>
                        <asp:Label ID="lblHtmlContent" runat="server"></asp:Label>
                    </td>
                </tr>  
                <tr>
                    <td colspan="2" height="30px" align="center">
                        <asp:Button ID="btnSave" runat="server" Text="儲存修改" OnClick="btnSave_Click" />
                        <asp:Button ID="btnCancel" runat="server" Text="取消" OnClick="btnCancel_Click" CausesValidation="false" />
                        <asp:Label ID="lblMsg" runat="server" Text="" ForeColor="Red" EnableViewState="false"></asp:Label>
                    </td>
                </tr>
            </table>
        </fieldset>
        <asp:UpdatePanel ID="UpdatePanel1" runat="server">
            <ContentTemplate>
                <fieldset class="fieldset">
                    <h1>
                        學習時數清單</h1>
                    <asp:Panel ID="PanelSub" runat="server">
                        <table cellpadding="0" cellspacing="0" border="0" width="100%" class="FormTable">
                            <tr>
                                <td align="left">
                                    &nbsp;&nbsp;&nbsp; 課程名稱:
                                    <asp:TextBox ID="txtLearnTitle" runat="server" ValidationGroup="Learn"></asp:TextBox>
                                    <asp:RequiredFieldValidator ID="RequiredFieldValidator3" runat="server" ErrorMessage="請輸入學習課程名稱"
                                        ControlToValidate="txtLearnTitle" ValidationGroup="Learn"></asp:RequiredFieldValidator><br />
                                    &nbsp;&nbsp;&nbsp; 受訓日期:
                                    <asp:TextBox ID="txtLearnDatePeriod" runat="server" ValidationGroup="Learn"></asp:TextBox>
                                    <asp:RequiredFieldValidator ID="RequiredFieldValidator4" runat="server" ErrorMessage="請輸入受訓日期"
                                        ControlToValidate="txtLearnDatePeriod" ValidationGroup="Learn"></asp:RequiredFieldValidator><br />
                                    &nbsp;&nbsp;&nbsp; 課程時數:
                                    <asp:TextBox ID="txtHours" runat="server" ValidationGroup="Learn"></asp:TextBox>
                                    <asp:RequiredFieldValidator ID="RequiredFieldValidator5" runat="server" ErrorMessage="請輸入課程時數"
                                        ControlToValidate="txtHours" ValidationGroup="Learn" Display="Dynamic"></asp:RequiredFieldValidator>
                                    <asp:RangeValidator ID="RangeValidator1" runat="server" ErrorMessage="請輸入課程時數(數字)"
                                        ControlToValidate="txtHours" MaximumValue="1000000" MinimumValue="0" Type="Double"
                                        ValidationGroup="Learn" Display="Dynamic"></asp:RangeValidator><br />
                                </td>
                                <td align="right" class="labelText">
                                    <%--<asp:Button ID="btnShowAdd" runat="server" Text="新增學堂訊息" OnClick="btnShowAdd_Click"/>--%>
                                </td>
                            </tr>
                            <tr>
                                <td align="left" colspan="2">
                                    <asp:Button ID="btnAddLearn" runat="server" Text="新增" OnClick="btnAddLearn_Click"
                                        ValidationGroup="Learn" />
                                </td>
                            </tr>
                        </table>
                    </asp:Panel>
                    <br />
                    <asp:GridView ID="gvSubList" runat="server" BackColor="White" BorderColor="#DEDFDE"
                        AutoGenerateColumns="false" BorderStyle="None" BorderWidth="1px" CellPadding="4"
                        ForeColor="Black" GridLines="Vertical" Width="100%" CssClass="datagrid" OnRowCommand="gvSubList_RowCommand1">
                        <RowStyle BackColor="#F7F7DE" />
                        <FooterStyle BackColor="#CCCC99" />
                        <PagerStyle BackColor="#F7F7DE" ForeColor="Black" HorizontalAlign="Right" />
                        <SelectedRowStyle BackColor="#CE5D5A" Font-Bold="True" ForeColor="White" />
                        <HeaderStyle BackColor="#6B696B" Font-Bold="True" ForeColor="White" />
                        <AlternatingRowStyle BackColor="White" />
                        <Columns>                            
                            <asp:TemplateField HeaderText="建立日期">
                                <ItemTemplate>
                                    <asp:HiddenField ID="hdnPostId" runat="server" Value='<%# Eval("PostId") %>' />
                                    <asp:Label ID="lblCreatedDate" runat="server" Text='<%# Eval("CreatedDate","{0:yyyy-MM-dd}") %>'></asp:Label>
                                </ItemTemplate>
                                <ItemStyle HorizontalAlign="Left" Width="10%" />
                                <HeaderStyle HorizontalAlign="Center" />
                            </asp:TemplateField>
                            <asp:BoundField DataField="Title" HeaderText="學習課程名稱" ItemStyle-HorizontalAlign="Left">
                                <ItemStyle HorizontalAlign="Left" />
                                <ItemStyle Width="10%" />
                            </asp:BoundField>
                            <asp:BoundField DataField="CustomField1" HeaderText="受訓日期" ItemStyle-HorizontalAlign="Left">
                                <ItemStyle HorizontalAlign="Left" />
                                <ItemStyle Width="10%" />
                            </asp:BoundField>
                            <asp:BoundField DataField="CustomField2" HeaderText="課程時數" ItemStyle-HorizontalAlign="Left">
                                <ItemStyle HorizontalAlign="Left" />
                                <ItemStyle Width="10%" />
                            </asp:BoundField>
                            <asp:TemplateField HeaderText="刪除">
                                <ItemTemplate>
                                    <asp:LinkButton ID="btnDelete" runat="server" CommandArgument='<%# Eval("PostId") %>'
                                        CommandName="myDel" CausesValidation="False" Text="刪除" OnClientClick="return confirm('確認刪除?')" />
                                </ItemTemplate>
                                <ItemStyle HorizontalAlign="Center" Width="10%" />
                                <HeaderStyle HorizontalAlign="Center" />
                            </asp:TemplateField>
                        </Columns>
                        <EmptyDataTemplate>
                            <div align="left">
                                無資料。</div>
                        </EmptyDataTemplate>
                    </asp:GridView>
                    <Webdiyer:AspNetPager ID="AspNetPager2" runat="server" CssClass="PagerStyle" HorizontalAlign="center"
                    OnPageChanged="AspNetPager2_PageChanged" PageIndexBoxType="TextBox" PageSize="5"
                    ShowPageIndexBox="Never" />
                </fieldset>
            </ContentTemplate>
        </asp:UpdatePanel>
    </asp:Panel>
    <br />
    <asp:Panel ID="pnlGv" runat="server">
        <fieldset class="fieldset">
            <table cellpadding="0" cellspacing="0" border="0" width="100%">
                <tr>
                    <td align="left">
                        關鍵字
                        <asp:TextBox ID="txtKeyWord" runat="server"></asp:TextBox>
                        &nbsp;&nbsp;&nbsp;
                        狀態:
                        <asp:DropDownList ID="ddlSearchStatus" runat="server">
                            <asp:ListItem Text="全部" Value="" Selected="True"></asp:ListItem>
                            <asp:ListItem Text="審核中" Value="0"></asp:ListItem>
                            <asp:ListItem Text="審核通過" Value="1"></asp:ListItem>
                            <asp:ListItem Text="審核不通過" Value="2"></asp:ListItem>
                            <asp:ListItem Text="停用" Value="3"></asp:ListItem>
                        </asp:DropDownList>                                                 
                    </td>
                    <td align="right" class="labelText">
                        <%--<asp:Button ID="btnShowAdd" runat="server" Text="新增學堂訊息" OnClick="btnShowAdd_Click"/>--%>
                    </td>
                </tr>
                <tr>
                    <td align="left" colspan="2">
                        <asp:Button ID="btnSearch" runat="server" Text="搜尋" OnClick="btnSearch_Click"/>                       
                    </td>
                </tr>
            </table>
            <br />
            <asp:GridView ID="gvList" runat="server" BackColor="White" BorderColor="#DEDFDE"
                AutoGenerateColumns="false" BorderStyle="None" BorderWidth="1px" CellPadding="4"
                ForeColor="Black" GridLines="Vertical" Width="100%" CssClass="datagrid" OnRowCommand="gvList_RowCommand1"
                OnRowDataBound="gvList_RowDataBound">
                <RowStyle BackColor="#F7F7DE" />
                <FooterStyle BackColor="#CCCC99" />
                <PagerStyle BackColor="#F7F7DE" ForeColor="Black" HorizontalAlign="Right" />
                <SelectedRowStyle BackColor="#CE5D5A" Font-Bold="True" ForeColor="White" />
                <HeaderStyle BackColor="#6B696B" Font-Bold="True" ForeColor="White" />
                <AlternatingRowStyle BackColor="White" />
                <Columns>
                    <asp:TemplateField HeaderText="建立日期">
                        <ItemTemplate>
                            <asp:HiddenField ID="hdnMemberId" runat="server" Value='<%# Eval("MemberId") %>' />
                            <asp:Label ID="lblCreatedDate" runat="server" Text='<%# Eval("CreatedDate","{0:yyyy-MM-dd}") %>'></asp:Label>
                        </ItemTemplate>
                        <ItemStyle HorizontalAlign="Left" Width="10%" />
                        <HeaderStyle HorizontalAlign="Center" />
                    </asp:TemplateField>
                    <asp:BoundField DataField="GetStr_Status" HeaderText="狀態" ItemStyle-HorizontalAlign="Left">
                        <ItemStyle HorizontalAlign="Left" />
                        <ItemStyle Width="10%" />
                    </asp:BoundField>
                    <asp:BoundField DataField="Name" HeaderText="姓名" ItemStyle-HorizontalAlign="Left">
                        <ItemStyle HorizontalAlign="Left" />
                        <ItemStyle Width="10%" />
                    </asp:BoundField>
                    <asp:BoundField DataField="LoginId" HeaderText="帳號" ItemStyle-HorizontalAlign="Left">
                        <ItemStyle HorizontalAlign="Left" />
                        <ItemStyle Width="50px" />
                    </asp:BoundField>
                    <%--<asp:BoundField DataField="Email" HeaderText="電子信箱" ItemStyle-HorizontalAlign="Left">
                        <HeaderStyle Width="50px" />
                        <ItemStyle HorizontalAlign="Left" />
                    </asp:BoundField>--%>
                    <asp:BoundField DataField="Phone" HeaderText="電話" ItemStyle-HorizontalAlign="Left">
                        <HeaderStyle Width="50px" />
                        <ItemStyle HorizontalAlign="Left" />
                    </asp:BoundField>
                    <asp:BoundField DataField="Mobile" HeaderText="手機" ItemStyle-HorizontalAlign="Left">
                        <HeaderStyle Width="50px" />
                        <ItemStyle HorizontalAlign="Left" />
                    </asp:BoundField>                    
                    <asp:TemplateField HeaderText="修改">
                        <ItemTemplate>
                            <asp:LinkButton ID="btnModify" runat="server" CommandArgument='<%# Eval("MemberId") %>'
                                Text="修改" CommandName="myModify" CausesValidation="False" />
                        </ItemTemplate>
                        <ItemStyle HorizontalAlign="Center" Width="10%" />
                        <HeaderStyle HorizontalAlign="Center" />
                    </asp:TemplateField>
                    <%--<asp:TemplateField HeaderText="刪除">
                        <ItemTemplate>
                            <asp:LinkButton ID="btnDelete" runat="server" CommandArgument='<%# Eval("PostId") %>'
                                CommandName="myDel" CausesValidation="False" Text="刪除" OnClientClick="return confirm('確認刪除?')" />
                        </ItemTemplate>
                        <ItemStyle HorizontalAlign="Center" Width="10%" />
                        <HeaderStyle HorizontalAlign="Center" />
                    </asp:TemplateField>--%>
                </Columns>
                <EmptyDataTemplate>
                    <div align="left">
                        無資料。</div>
                </EmptyDataTemplate>
            </asp:GridView>
            <Webdiyer:AspNetPager ID="AspNetPager1" runat="server" CssClass="PagerStyle" HorizontalAlign="center"
                    OnPageChanged="AspNetPager1_PageChanged" PageIndexBoxType="TextBox" PageSize="10"
                    ShowPageIndexBox="Never" />
        </fieldset>
    </asp:Panel>
</asp:Content>

